package unit4.part8;

public class StudentTest {
    public static void main(String[] args) {
        Student student = new Student(1, "ZhangSan", Nation.HAN, 1.1f);
    }
}

class Student {
    private int sno;
    private String name;
    private Nation nation;
    private float score;

    // alt+insert
    Student(int sno, String name, Nation nation, float score) {
        this.sno = sno;
        this.name = name;
        this.nation = nation;
        this.score = score;
    }

    public int getSno() {
        return sno;
    }

    public void setSno(int sno) {
        this.sno = sno;
    }
}

enum Nation {
    HAN("汉"), HUI("回"), MENG("蒙"), MAN("满");
    private String name;

    Nation(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }
}
